import { createRouter, createWebHistory } from 'vue-router'
import layout from '@/views/layout/index.vue'
import home from '@/views/home/index.vue'
import category from '@/views/category/index.vue'
import my from '@/views/my/index.vue'
import shopcar from '@/views/shopcar/index.vue'



const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      component:layout,
      children:[
        {
          path:'',
          component:home,
          
        },
        {
          path:'category',
          component:category
        },
        {
          path: 'my',
          component: my
        },
        {
          path: 'shopcar',
          component: shopcar
        }
      ]
    }
    
  ]
})

export default router
